<template>
	<view class="yd_list">
		<view class="yd_list_box">
				<view class="index_items"  v-for="(item,index) in  list" :key='index'>
					<view class="index_items_top">
						{{ $t("message.ydh") }} ：{{item.number}}
						<text v-if="langs=='en'">
							{{item.status_ru}}
						</text>
						<text v-else>
							{{item.status_text}}
						</text>
					</view>
					<view class="index_items_bottom">
						<view class="index_items_bottom_h2">
							
						</view>
						<view class="index_items_bottom_text">
							<view class="">
								{{ $t("message.fjr") }}：{{item.addresser}}
							</view>
							<view class="">
								{{ $t("message.fhrq") }}：{{item.delivery_date}}
							</view>
						</view>
					</view>
					<view class="right">
						<button class="index_items_button" @click="de(item.id)">
							{{ $t("message.ckxq") }}
						</button>
						
					</view>
					
				</view>
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				langs:''
			}
		},
		onShow() {
			
		},
		onLoad() {
			this.getlist()
			if(uni.getStorageSync('lang')=='en'){
				uni.setNavigationBarTitle({
				    title: "Регистрация накладной"
				});
				this.langs='en'
			}
		},
		methods: {
			// 详情
			de(uid){
				uni.navigateTo({
					url:'/pages/Movement tracking/Movement tracking?id='+ uid
				})
			},
			getlist(){
				let _this=this
				uni.$u.http.post('/api/order/list', {
				}).then(res => {
					console.log(res)
					_this.list=res.data
				}).catch(err => {
				    // uni.showToast({
				    //         icon: 'none',
				    //         title: err.msg
				    // })
				})
			}
		}
	}
</script>

<style  lang="less">
	.yd_list{
		min-height: 100vh;
		background: linear-gradient(0deg, #F9F9F9, #DCF0E3);
		padding-bottom: 30rpx;
	}
	.yd_list_box{
		padding: 20rpx;
	}
	.index_items{
		background: #FFFFFF;
		border-radius: 10px;
		box-sizing: border-box;
		padding: 30rpx 8rpx;
		margin-bottom: 20rpx;
	}
	.index_items_top{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20rpx 27rpx;
		border-bottom: 2rpx solid #F7F7F9;
		font-weight: normal;
		font-size: 28rpx;
		color: #797979;
		text{
			font-weight: 400;
			font-size: 26rpx;
			color: #01653B;
		}
	}
	.index_items_bottom{
		padding: 30rpx 12rpx;
		border-bottom: 2rpx solid #F7F7F9;
		margin-bottom: 30rpx;
	}
	.index_items_bottom_h2{
		font-weight: bold;
		font-size: 30rpx;
		color: #01653B;
		margin-bottom: 29rpx;
	}
	.index_items_bottom_text>view{
		font-weight: 400;
		font-size: 26rpx;
		color: #333333;
		line-height: 48rpx;
	}
	.right{
		display: flex;
		justify-content: flex-end;
	}
	.index_items_button{
		min-width: 170rpx;
		white-space: nowrap;		
		border-radius: 30rpx;
		border: 2rpx solid #01653B;
		font-weight: normal;
		font-size: 26rpx;
		color: #01653B;
		background: #ffffff;
		display: inline-block;
		margin: 0 ;
		// margin-left: calc(100% - 170rpx);
	}
</style>
